// {"id": 0, "name": "01大叔", "url": "", "tags": "大叔", "pUrl": "https://fm.2025wpfh.top/upload/vod/20211220-1/4be0f0310c125483f59049d5a356cf4c.jpg", "vUrl": "http://vip7.3sybf.com/20211129lO0ji7/index.m3u8"}
class VideoBean {
   int id;
  final String name;
  final String url;
  final String tags;
  final String pUrl;
  final String vUrl;

  VideoBean({
    required this.id,
    required this.name,
    required this.url,
    required this.tags,
    required this.pUrl,
    required this.vUrl,
  });

  // 从JSON创建对象的工厂构造函数
  factory VideoBean.fromJson(Map<String, dynamic> json) {
    return VideoBean(
      id: json['id'] ?? 0,
      name: json['name'] ?? '',
      url: json['url'] ?? '',
      tags: json['tags'] ?? '',
      pUrl: json['pUrl'] ?? '',
      vUrl: json['vUrl'] ?? '',
    );
  }

  // 将对象转换为JSON
  Map<String, dynamic> toJson() {
    return {
      'id': id,
      'name': name,
      'url': url,
      'tags': tags,
      'pUrl': pUrl,
      'vUrl': vUrl,
    };
  }

  @override
  String toString() {
    return 'VideoBean{id: $id, name: $name, url: $url, tags: $tags, pUrl: $pUrl, vUrl: $vUrl}';
  }
}